package com.digital.welcome.websocket.mywebsocket.model;

import org.apache.commons.collections4.Equator;

public class WebSocketMessageEvent implements Equator<WebSocketMessageEvent> {
    public int Code;
    public WebSocketMessageEvent(int code){
        Code = code;
    }




    /// <summary>
    /// Code : 1
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnConnect = new WebSocketMessageEvent(1);

    /// <summary>
    /// Code : 2 
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDisconnect = new WebSocketMessageEvent(2);
    /// <summary>
    /// Code : 100
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnClientConnect = new WebSocketMessageEvent(100);
    /// <summary>
    /// Code : 101
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnServerConnect = new WebSocketMessageEvent(101);
    /// <summary>
    /// Code : 102
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDataSideConnect = new WebSocketMessageEvent(102);

    /// <summary>
    /// Code : 200
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnClientDisconnect = new WebSocketMessageEvent(200);
    /// <summary>
    /// Code : 201
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnServerDisconnect = new WebSocketMessageEvent(201);
    /// <summary>
    /// Code : 202
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDataSideDisconnect = new WebSocketMessageEvent(202);

    /// <summary>
    /// Code : 300
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnClientMessage = new WebSocketMessageEvent(300);
    /// <summary>
    /// Code : 301
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnServerMessage = new WebSocketMessageEvent(301);
    /// <summary>
    /// Code : 302
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDataSideMessage = new WebSocketMessageEvent(302);


    /// <summary>
    /// Code : 400
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnClientTempMessage = new WebSocketMessageEvent(400);
    /// <summary>
    /// Code : 401
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnServerTempMessage = new WebSocketMessageEvent(401);
    /// <summary>
    /// Code : 402
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDataSideTempMessage = new WebSocketMessageEvent(402);

    /// <summary>
    /// Code : 500
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnClientPreviousMessage = new WebSocketMessageEvent(500);

    /// <summary>
    /// Code : 501
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnServerPreviousMessage = new WebSocketMessageEvent(501);
    /// <summary>
    /// Code : 502
    /// </summary>
    /// <returns></returns>
    public static WebSocketMessageEvent OnDataSidePreviousMessage = new WebSocketMessageEvent(502);

    @Override
    public boolean equate(WebSocketMessageEvent obj1, WebSocketMessageEvent obj2) {
        // TODO Auto-generated method stub
        return obj1.Code == obj2.Code;
    }
    @Override
    public int hash(WebSocketMessageEvent o) {
        // TODO Auto-generated method stub
        return o.Code;
    }
}
